<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>配置主明细界面</title>
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/js/themes/default/easyui.css" />
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/js/themes/icon.css" />
		<link rel="stylesheet"
			href="${pageContext.request.contextPath}/homepages/css/main.css"
			type="text/css" />
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/js/jquery.easyui.min.1.2.2.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/homepages/js/forms.js"></script>
		<script type="text/javascript">
			$(function(){
				$('#butnShow').load('${pageContext.request.contextPath}/butScript/singleInput',{'configId':'UIButtonAdd'});
				quOrui ="";
				path="";
			})
			var quOrui ="";
			var  path="";
			function queryOrUI(){
				quOrui=$('#quOrUi').val();
				if(quOrui=='queryButn'){
					$('#butnShow').load(path,{'configId':'QueryButtonAdd'});
				}else if(quOrui=='uiButn'){
					$('#butnShow').load(path,{'configId':'UIButtonAdd'});
				}
			}
			
			function addButn(){
				path="${pageContext.request.contextPath}/sys/saveUI";
				var show = $('input[name=show]').val();
				if(show =='on'){
					$('input[name=show]').val('T');
				}else{
					$('input[name=show]').val('F');
				}
				$.ajax({
					type:'post',
					url:path,
					data:$('#INFO_FORM').serialize(),
					success:function(data){
						if(data == 1){
							$.messager.alert('保存结果','按钮已经保存成功','info');
						}else{
							$.messager.alert('保存结果','按钮保存失败','error');
						}
					}
				})
			}
			 
 		</script>
	</head>

	<body>
		<span>选择按钮所属</span>
		<span>
			<select id="quOrUi" onchange="queryOrUI()">
				<option value="queryButn">查询页面的按钮</option>
				<option value="uiButn">UI页面的按钮</option>
			</select>
		</span>
		<div class="easyui-panel" title="配置信息展示" collapsible="true">
			 <div id="butnShow">
			 	
			 </div>
		</div>
	</body>
</html>
